/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.punish.common.nonlitigation.controller;

import com.icinfo.cloud.provider.punish.common.nonlitigation.dto.NonLitigationExecuteResultSaveDto;
import com.icinfo.cloud.provider.punish.common.nonlitigation.service.ICaseNonLitigationExecuteRecordService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 描述: 非诉执行对外接口 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年04月07日
 */
@RestController
@RefreshScope
@RequestMapping("/punish/nonlitigation/execute/api")
@Slf4j
public class CaseNonLitigationExecuteApiController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(CaseNonLitigationExecuteApiController.class);

    @Resource
    private ICaseNonLitigationExecuteRecordService caseNonLitigationExecuteRecordService;


    /**
     * 【1.9.2】保存非诉执行讼裁决结果（法院回调）
     *
     * @param saveDto 保存dto
     * @return {@link Result<String> }
     * @author shishengyao
     * @date 2022/12/06
     */
    @PostMapping("/saveDecisionResult")
    public Result<String>  saveDecisionResult(@RequestBody @Validated NonLitigationExecuteResultSaveDto saveDto) {
        return caseNonLitigationExecuteRecordService.saveDecisionResult(saveDto);
    }


}
